import sketch.GenTest;
import sketch.MethodChoice;
import sketch.OracleChoice;
import sketch.ValueChoice;
import sketch.generator.ValueGenerator;
import sketch.subject.TreeMap;


public class TreeMapSketchExecution extends GenTest {

	@Override
	public void scratchTest() {
		/**
		 * Sketch begins
		 * */
		TreeMap treemap = new TreeMap();
		treemap.put(10);
		//treemap.put(2);
		treemap.put(3);
		
		ValueGenerator<Integer> intPool = ValueChoice.getIntRange(5, 9);
		MethodChoice.permute(treemap, "putTwo(int,int)", intPool);
		
		ValueGenerator<?> containArgs = ValueChoice.getIntRange(4, 10);//ValueChoice.randomChoose(1, intPool);
		OracleChoice.observeMethodOutput(treemap, "containsKey(int)", containArgs, false);
		
		ValueGenerator<?> putArgs = ValueChoice.getIntPool(20, 2, 100);
		OracleChoice.observeMethodOutput(treemap, "putTwo(int,int)", putArgs, false);
		
		treemap.remove(3);
		treemap.remove(2);
		treemap.remove(1);
		treemap.remove(20);
	}

	@Override
	public String scratchTestPath() {
		//System.out.println("call this");
		return "/scratch/eclipseworkspace/SketchSeq/examples/TreeMapSketchExecution.java";
	}

	@Override
	public Class<?>[] testedClasses() {
		return new Class<?>[]{TreeMap.class};
	}

	@Override
	public String testOutputPath() {
		return ".";
	}

	@Override
	public String testClassName() {
		return "TreeMapTestExample";
	}
	
}
